<template>
  <li>
    <img :src="item.pic" alt="" />
    <span>价格是：{{ item.price }}</span>
    <van-icon
      name="shopping-cart-o"
      size="30"
      class="shopicon"
      @click="showDialog(item)"
    />
  </li>
</template>

<script>
export default {
  props: ["item"],
  methods: {
    
    showDialog(item) {
      this.$emit("showDialog",item) 
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss"></style>
